﻿using System;

using NUnit.Framework;

using octalforty.Syndication.Core;

namespace octalforty.Syndication.UnitTests.Core.Rss
{
    public abstract class AggregatorBaseTestFixture
    {
        [Test()]
        [ExpectedException(typeof(ArgumentNullException))]
        public void AggregateFeedDocumentCannotBeNull()
        {
            IAggregator aggregator = CreateInstance();
            ISyndicationFeed syndicationFeed = null;
            
            aggregator.Aggregate(null, ref syndicationFeed);
        }

        #region Overridables
        /// <summary>
        /// When overriden in a derived class, creates an instance of <see cref="IAggregator"/>.
        /// </summary>
        /// <returns></returns>
        protected abstract IAggregator CreateInstance();
        #endregion
    }
}
